<extend name="public@base5"/>
<block name="head">
    <link rel="stylesheet" href="__STATIC__/css/mall.css?v={$_static_version}"></link>
</block>
<block name="main">
    
    <div class="wrap">
        <ul class="nav nav-tabs">
                <li class="nav-item">
                        <a class="nav-link" href="{:url('Store/subIndex',['type'=>$store_type])}">商品列表</a>
                </li>
                <li class="nav-item">
                        <a class="nav-link active" href="#">{$item_name} 参数</a>
                </li>
        </ul>
    </div>
    
    <div class="wrap row mt-2">
        <foreach name="attr_item" item="attr">
            <div class="input-group mt-2">
                <div class="input-group-text">
                    <input name="item_id" type="hidden" value="{$id}">
                    <label class="form-control-append">属性名</label>
                    <label>
                        <input name="attr_name" type="text" class="form-control" value="{$attr.attr_name}" >
                    </label>
                    <label class="form-control-append">属性值</label>
                    <label>
                        <input name="attr_value" type="text" class="form-control"  value="{$attr.attr_value}" >
                    </label>
                    <empty name="$attr.no_up">
                    <a class="btn js-ajax-btn btn-info" title="排序"  href="admin/property/up/id/{$attr.id}" >
                    <i class="fa fa-arrow-up"></i>
                    </a> 
                    </empty>
                    <empty name="$attr.no_down">
                    <a class="btn js-ajax-btn btn-info" title="排序" href="admin/property/down/id/{$attr.id}">
                    <i class="fa fa-arrow-down"></i>
                    </a> 
                    </empty>
                     <a class="btn js-ajax-delete btn-danger" title="删除" href="admin/property/delete/id/{$attr.id}">
                    <i class="fa fa-trash-o"></i>
                    </a>
                </div>
            </div>
        </foreach>
        <div class="m-6 mt-2">
            <div>
                <form class="form js-ajax-form" action="admin/property/save" method="post">
                    <div class="input-group">
                        <div class="input-group-text">
                            <input name="item_id" type="hidden" value="{$id}">
                            <label>
                                <input name="attr_name" type="text" class="form-control" value="" placeholder="参数名称">
                            </label>
                            <label>
                                <input name="attr_value" type="text" class="form-control"  value="" placeholder="参数值">
                            </label>
                            <button type="submit" class="form-control js-ajax-submit btn btn-primary"><i class="fa fa-plus"></i> 添加</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</block>

<block name="scripts">
    <script src="__STATIC__/js/mall.js"></script>
</block>
